<!DOCTYPE html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <style>
  </style>
  <script>
//跨浏览器兼容获取屏幕宽和高
var w=window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var h=window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
    alert(w+':'+h);

  </script>
 </head>
 <body>
 </body>
</html>

